/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 东莞呵呵
 * Date:2022-03-22
 * Time:14:29
 */
public class TestDemo {
    public static void main(String[] args) {
        int nums[]={-10,2,3,246,-100,0,5};
        double ave=0;
        int max_num=nums[0];
        int min_num=nums[0];
        for (int i = 0; i < nums.length; i++) {
            if(nums[i]<min_num) {
                min_num=nums[i];
            }
            if(nums[i]>max_num) {
                max_num = nums[i];
            }
            ave+=nums[i];
        }
        System.out.println("最大值"+max_num);
        System.out.println("最小值"+min_num);
        System.out.println("平均值"+(ave/nums.length));
    }
}
